package com.springboot.strategy.demo001.impl;

import com.springboot.strategy.demo001.IPriceStrategy;

/**
 * vip顾客策略
 */
public class VipPriceStrategy implements IPriceStrategy {
    public double getPrice(double originalPrice) {
        System.out.println("vip客户，满100减40，不满100，打7折");
        if(originalPrice >= 100){
            return originalPrice - 40;
        }
        return originalPrice * 0.7;
    }
}
